package com.ccz.demo.design.builder.computer;

import java.lang.reflect.Modifier;

/**
 * @ClassName ConcreateBuilder
 * @Author caihaoyun
 * @Date 2020/7/3
 * @Version V1.0
 **/
public class ConcreateBuilder implements Builder {

    private Computer computer = new Computer();

    @Override
    public void createCpu(String cpu) {
        computer.setCpu(cpu);
    }

    @Override
    public void createDisk(String disk) {
        computer.setDisk(disk);
    }

    @Override
    public void createMotherBoard(String motherBoard) {
        computer.setMotherboard(motherBoard);
    }

    @Override
    public void createMemory(String memory) {
        computer.setMemory(memory);
    }

    @Override
    public Computer createComputer() {
        return computer;
    }
}
